/*
    created: 2023/4/7
    filename: Adapt.cpp
    author: 李东霖
    purpose: Adapt模式的演示代码  
*/


#include"Adapt.h"
#include<iostream>

void Adaptee::SpecialRequest()
{
    std::cout << "SpecialRequest of Adaptee\n";
}


void Adapter::Request()
{
    std::cout << "Request of Adapter\n";   
    m_pAdptee->SpecialRequest();
}

Adapter::~Adapter()
{
    delete m_pAdptee;
    m_pAdptee = nullptr;
}


void Adapter1::Request()
{
    std::cout << "Request of Adapter1\n";   
    this->SpecialRequest();
}